<div id="layer-photos-demo" class="layer-photos-demo">
    {foreach $data['image_array'] as $k => $v}
    <img  layer-src="{$v}" src="{$v}" style="width:150px;height: 150px;">
    {/foreach}
</div>
<script>
    //Demo
    layui.use(['layer'], function(){
        var $ = layui.$,layer = layui.layer;
        layer.photos({
            photos: '#layer-photos-demo'
            ,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机（请注意，3.0之前的版本用shift参数）
        });
    });

</script>
